Release 10.1A: OpenEdge Getting Started:
Installation and Configuration
Using the mergeprop utility
This section provides the syntax and instructions to use the
mergeproputility from a command line.Command syntax
The following table presents the mergeprop syntax:
Operating system Syntax1 UNIX
Windows
1Command switches can be defined in any order following the mergeprop command.1Reference Table 10–2 for the details about valid values for argument variables.
Command switches and arguments
Table 10–2 summarizes the syntax elements used with the
mergepropcommand. Refer to the preceeding "Mergeprop utility overview" section for additional descriptive information.
Table 10–2: Command line input to the mergeprop command Switch1 Arguments Notes Each argument (other thannone) implies a specific target file in thepropertiesdirectory.See the "File type" section. If no action is specified,updateis assumed by default.Thelistandlistallactions require an additional argument, the name of the property group to be displayed (for example,ubroker.AS.asbroker1). Do not include the square brackets ([]) that enclose the group name in the ubroker.properties file.Onupdateandcreateactions, groups listed with no properties in the delta file are ignored. Path to the property file to be modified. If you are updating a property file that is in the$DLC/propertiessubdirectory, you can omit this option. Only use this option when the property file you plan to update exists in a location other than the$DLC/properties/subdirectory. File containing create, update, or delete changes. None. Performs all processing without actually making changes to the target file. This option lets you test for errors. None. Does not create a backup to the target file before making changes. Unless you invoke this option, mergeprop saves a copy of the original target file in the same directory. The backup copy has a system- generated unique string appended to the name (for example,ubroker.properties (31420040644533). None. Suppresses all messages. None. Lists or deletes all groups, server groups, and configurations associated with the specified database.The Recurse option is only valid when the file type is “database” and the action is “list all” or “delete.”
1Command switches can occur in any order following the mergeprop command.
Target file
The target file is the existing property file that you are operating on. You can add, delete, modify or list properties in the target file. The mergeprop program automatically creates a backup of the original target file, unless you instruct it not to do so. You can also list existing properties without making any changes.
Note: If the -typeequalsremove.propertiesfile (-type ubroker), then the default location is$DLC/properties/ubroker.properties. If you want to override this default setting, you should use the-targetoption.You can explicitly specify a target file, but it is not necessary to do so if you are operating on one of the standard property files listed in Table 10–3. The file type that you provide as input implies a specific property file, which the program targets by default if no file is specified. These standard property files are located in the
OpenEdge-Install-Directory\propertiesdirectory.
If explicitly specified, the target file is expressed as an argument to the
-targetcommand switch.Delta file
To use the utility to make changes, you must list the affected groups and properties in a delta file. The delta file must specify at least one property group; it can also specify one or more properties and associated values. The content of the delta file must conform to the syntax rules for property files, as explained in the "Logical structure and syntax of property files" section.
Note: When simply listing (not changing) properties, you do not specify a delta file.The delta file is expressed as an argument to the
-deltacommand switch.File type
There are five distinct property file types:
As indicated in Table 10–3, one standard property file of each type is found in the
OpenEdge-Install-Directory\propertiesdirectory.Specifying the file type enables the mergeprop utility to process delta and target files appropriately. It also makes it unnecessary to explicitly identify the target file, unless you are operating on a copy or test file other than the standard file in the
propertiesdirectory. The program can recognize “none” as a valid type and perform default processing, but you should provide a specific type as input.The file type is expressed as an argument to the
-typecommand switch.Action switch argument values
The
mergeproputility operates on the target file, based on action you provide as input, in one of the following ways:
- Update — Creates any new property groups and modifies any existing groups found in the delta file. Properties in the target file are updated to match those in the delta file. This operation is performed by default if you do not explicitly specify an action.
- Create — Creates new property groups listed in the delta file, with properties as specified in the delta file. (The delta file must contain only new groups; inclusion of a group that already exists in the target file causes an error and cancels the operation.)
- Delete — Removes from the target file any property groups listed in the delta file. The entire groups are deleted; individual properties are not processed. No exception occurs if the delta file contains groups that do not exist in the target file; such groups are simply ignored.
- List — Displays (to
stdout) all properties and values defined specifically for a given group. Inherited properties are not displayed.- List all — Displays (to
stdout) all properties and values defined for a given group, including inherited properties. (This action applies only to the database.)In this context, group refers to a group as listed in the
Note: The List and List all actions are useful for creating a delta file. You can redirect output to a file and use the result as a template for modifying existing instances or creating new ones.ubroker.propertiesfile. For example, [UBroker.AS.asbroker1]. (Note that the brackets are not part of the command.) For more information about groups, see the "Logical structure and syntax of property files" section.The following sections provide several examples to demonstrate how you can perform various modifications using the mergeprop utility.
The following example has two parts. The first code fragment shows the contents of the delta file in which a new AppServer Broker instance,
addasbroker2, is defined. The contents of this delta file is based on minor changes made to the sample default brokerasbroker1, as shown:
The command in the following example adds the new asbroker2 to the standard, OpenEdge-supplied
ubroker.propertiesfile.
This same command structure can be used to update a group.
Note: On an add action, you are only required to specify those properties whose values you intend to override. Default values are applied in all other circumstances.The second example demonstrates how to add and delete property specified as an “environment” property to the asbroker2 previously created. It is also defined in two parts. The following code fragment shows the environment property is being added to the asbroker2 definition in the ubroker.properties file:
It also is helpful to know how to perform a deletion. In reviewing the third example, keep in mind that you can only perform group-level deletions; you cannot delete a single property within a group. The following example shows how to delete the instance of asbroker2:
The fourth example lists the properties defined specifically for the
UBroker.AS.asbroker1group inubroker.properties, omitting inherited properties, as follows:
The fifth example lists all properties of the
UBroker.AS.asbroker1group, including inherited properties, as shown:
The sixth example lists all properties, including inherited properties, of the
FMCONFIGCLI.OSFIgroup in the fileinstallation-path\%DLC%\properties/JavaTools.properties,as shown:
As shown in the seventh example, it is helpful to know how to list a full group definition. The following code fragment shows how to enter the mergeprop command for a full database group definition. In the following example, the sports database, is referenced and its full group definition which lists all configurations and server groups associated with the sports database noted:
Referencing the previous code fragment, you could update a port specification for the sports database using the following example commands:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |